<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>农资与农产品全程供应链物流平台-订单下车</title>
<meta name="kewywords" content="农资与农产品全程供应链物流平台"/>
<meta name="description" content="农资与农产品全程供应链物流平台"/>
<link href="css/style.css" type="text/css" rel="stylesheet"/>
<script language="javascript" type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="js/LocalList.js"></script>	
	<script type="text/javascript">
		$(document).ready(function(){
			if($("#errorMessage").val() == "norecord"){
				alert("查无此条记录，请重新输入订单号码");
			}else if($("#errorMessage").val() == "success"){
				alert("卸车成功");
			}else if ($("#errorMessage").val() == "duplicate_unload") {
				alert("重复卸车");
			}
		});
		function queryCheck(){
			var pattern = new RegExp(/^[0-9-+]+$/);//^表示开始 $表示结束 右方括号（])后跟+号，意味着这个模式可以重复一次或多次
	        var orderid = $("#orderId").val();
	        if($.trim(orderid).length != 12){
	        	alert("请输入12位数字订单号码");
	        	return;
	        }else if(!pattern.test(orderid)){
	        	alert("您输入的号码中含有非数字字符，请重新输入");
	        	return;
	        }
	        $("#queryOrder").submit();
		}		
	</script>
</head>
<body>
<%@include file="top.jsp" %>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="187" height="37" bgcolor="#e0e0e0" class="brt bbt">
    	<div class="topleft fl">系统菜单栏</div>
    </td>
    <td bgcolor="#e7e7e7" class=" bbt">
    	<div class="topleft fl">
    		您现在的位置：首页&nbsp;>&nbsp;<span>订单下车</span>
    	</div>
    </td>
  </tr>
  <tr>
    <td width="187" height="100%" valign="top" bgcolor="#FFFFFF" class="brt">
    	<div class="left_bk"> 
           <div class="menu2">
         <%@include file="transport_left.jsp" %>
        </div>
        </div></td>
    <td align="left" valign="top" bgcolor="#FFFFFF">
    <div class="content">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="38" style="background:url(images/zz_tit.jpg) left top repeat-x;">
          	<div class="tt_back fl">订单下车</div>
          	<div class="fr">
          		<img src="images/tit_right.jpg" alt="" width="103" height="38" />
          	</div>
          </td>
        </tr>
        <tr>
          <td class="borders btn">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          	<tr>
		        <td>
		        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#e3e3e3">
		          <tr class="captitle">
		            <td height="31" colspan="10" align="center" valign="middle" style="padding-left: 20px;font-weight: bold;">
						运输车辆
		            </td>
		            </tr>
		          <tr height="26" bgcolor="#efefef" class="captit">
		            <td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">车辆编号</td>
		            <td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">车牌号码</td>
		            <td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">车辆类型</td>
		            <td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">道路运输证</td>
		            <td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">车辆吨位</td>
		            <td width="50%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">运输路线</td>
		          </tr>
		          <s:iterator value="sches" var="obj">
		          <tr height="26" bgcolor="#efefef">
		            <td height="26" align="center" valign="middle" bgcolor="#FFFFFF">${obj.vehicleno }</td>
		            <td height="26" align="center" valign="middle" bgcolor="#FFFFFF">${obj.licensePlateNo }</td>
		            <td height="26" align="center" valign="middle" bgcolor="#FFFFFF">${obj.vehicleType }</td>
		            <td height="26" align="center" valign="middle" bgcolor="#FFFFFF">${obj.RoadTransportNo }</td>			            
		            <td height="26" align="center" valign="middle" bgcolor="#FFFFFF">${obj.vehicleTonnage }</td>
		            <td height="26" align="center" valign="middle" bgcolor="#FFFFFF">${obj.start_to }-->${obj.pass_to }-->${destination }&nbsp;&nbsp;&nbsp;</td>
		          </tr>
		          </s:iterator>
		          
		        </table>
		        </td>
		      </tr>
          	<tr>
			    <td bgcolor="#fffeee" height="41" style="border-bottom:#fee7bd solid 1px;" align="center">
			    <div style="height:450px">
			    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
			    	<tr>
					    <td height="41" bgcolor="#fffeee" style="border-bottom:#fee7bd solid 1px;padding-left: 20px;">
					    <form action="transport/unLoadOrder.action" id="queryOrder" method="post">	
					    	<s:hidden name="errorMessage" id="errorMessage"/>	
						    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left">
							    <tr>
							    <td width="10%" align="right">订单号：</td>
							    <td width="20%" align="left">
							    	<input type="text" id="orderId" name="orderId" onblur="queryCheck()"						    		
							    		style="width: 200px;" class="input_are w122" />
							    </td>
							  	</tr>
						  	</table>
						</form>
						</td>
				  	</tr>
				  	<tr>
				  		<td>
				  			<div style="height:400px;overflow-y: scroll;overflow-x: auto;">
				  			<s:if test="errorMessage != null">
				  			<table id="stockInOrderInfo" width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#e3e3e3">
				  				<tr class="captitle">
						            <td height="31" colspan="6"  valign="middle" style="padding-left: 20px;font-weight: bold;">
										订单信息
						            </td>
						        </tr>
				  				<tr style="height: 30px;" bgcolor="#efefef">
									<td align="right" width="10%">订单号：</td>
									<td width="30%" align="left" valign="middle">
										<input type="text" class="input_are" value="${order.id}" readonly />
									</td>
								    <td align="right" width="10%">寄件日期：</td>
									<td width="50%" align="left" valign="middle">				  				
										<input type="text" value="<s:date name="order.senddate" format="yyyy-MM-dd" />" 
											class="input_are" readonly/>
									</td>
								</tr>
								<tr style="height: 30px;" bgcolor="#efefef">
									<td align="right" width="10%">寄件人姓名：</td>
									<td width="30%"  align="left" valign="middle">
										<input type="text" class="input_are" value="${order.sender}" readonly/></td>
								    <td align="right" width="10%">收件人姓名：</td>
									<td width="50%" align="left" valign="middle">
										<input type="text" class="input_are" value="${order.recipient}" readonly/></td>
								</tr>
								<tr style="height: 30px;" bgcolor="#efefef">
									<td align="right" width="10%">寄件人公司：</td>
									<td width="30%" align="left" valign="middle">
										<input type="text" class="input_are" value="${order.senderfirm}" readonly/></td>
								    <td align="right" width="10%">收件人公司：</td>
									<td width="50%" align="left" valign="middle">
										<input type="text"  class="input_are" value="${order.recipientfirm}" readonly/></td>
								</tr>
								<tr style="height: 30px;" bgcolor="#efefef">
									<td align="right" width="10%">寄件人电话：</td>
									<td width="30%" align="left" valign="middle">
										<input type="text" class="input_are" value="${order.sendertel}" readonly/></td>
								    <td align="right" width="10%">收件人电话：</td>
									<td width="50%" align="left" valign="middle">
										<input type="text" class="input_are" value="${order.recipienttel}" readonly/></td>
								</tr>
								<tr style="height: 30px;" bgcolor="#efefef">
									<td align="right" width="10%">寄件人地址：</td>
									<td width="30%" align="left" valign="middle" >												  
										<input type="text" style="width:350px" class="input_are" value="${order.senderaddr}" readonly/>						
									</td>				
									<td align="right" width="10%">收件人地址：</td>
									<td width="50%" align="left" valign="middle" >
										<input type="text" style="width:350px" class="input_are" value="${order.recipientaddr}" readonly/>
									</td>
								</tr>
								<tr style="height: 30px;" bgcolor="#efefef">
									<td align="right" width="10%">原寄地：</td>
									<td width="30%" align="left" valign="middle">
										<input type="text" class="input_are" value="${order.origin}" readonly/></td>
								    <td align="right" width="10%">目的地：</td>
									<td width="50%" align="left" valign="middle">
										<input type="text" class="input_are" value="${order.destination}" readonly/></td>
								</tr>
								<tr style="height: 30px" bgcolor="#efefef">
									<td align="right" width="10%">规格：</td>
									<td colspan="3" align="left" valign="middle" width="90%">
										数量
										<input type="text" style="width: 60px;" class="input_are" value="${order.quantity}" readonly/>&nbsp;&nbsp;&nbsp;&nbsp;
										重量
										<input type="text" style="width: 60px;" class="input_are" value="${order.weight}" readonly/>kg&nbsp;&nbsp;&nbsp;&nbsp;
										长
										<input type="text" style="width: 60px;" class="input_are" value="${order.length}" readonly/>m&nbsp;&nbsp;&nbsp;&nbsp;
										宽
										<input type="text" style="width: 60px;" class="input_are" value="${order.width}" readonly/>m&nbsp;&nbsp;&nbsp;&nbsp;
										高
										<input type="text" style="width: 60px;" class="input_are" value="${order.height}" readonly/>m&nbsp;&nbsp;
									</td>
								</tr>									
								<tr style="height: 30px;" bgcolor="#efefef">
									<td align="right" width="10%">费用：</td>
									<td width="30%" align="left" valign="middle">				  				
										<input type="text" class="input_are" value="${order.cost}" readonly/>
									</td>
									<td align="right" width="10%">收件员：</td>
									<td width="50%" align="left" valign="middle">				  				
										<input type="text" class="input_are" value="${order.receiver}" readonly/>
									</td>			  			
								</tr>
								<tr style="height: 30px;" bgcolor="#efefef">											
									<td align="right" width="10%">备注：</td>
									<td width="90%" align="left" valign="middle" colspan="3">				  				
										<input type="text" style="width:350px" class="input_are" value="${order.remark}" readonly/>
									</td>			  			
								</tr>
								<tr class="captitle">
						            <td height="31" colspan="6"  valign="middle" style="padding-left: 20px;font-weight: bold;">
										卸车信息
						            </td>
						        </tr>
								
						        <tr style="height: 30px;" bgcolor="#efefef">
						        	<td height="26" align="right" valign="middle" >司机</td>
						          	<td align="left" valign="middle">
						          		<input type="text" class="input_are" value="<s:property value="#session.admin.fullName"/>" readonly/>
						          	</td>
						            <td height="26" align="right" valign="middle" >卸车时间</td>
						          	<td align="left" valign="middle">
						          		<input type="text" class="input_are" 
						          			value="<s:date name="transportInfo.registerdate" format="yyyy-MM-dd HH:mm:ss" />" readonly/>
						          	</td>
						        </tr>
						        <tr style="height: 30px;" bgcolor="#efefef">
						        	<td height="26" align="right" valign="middle" >备注</td>
						          	<td align="left" valign="middle" colspan="3">
						          		<input type="text" style="width:350px" class="input_are" value="${transportInfo.remark }" readonly/>
						          	</td>
						        </tr>								          
				  			</table>
				  			</s:if>
				  			</div>
				  		</td>
				  	</tr>		   
			    </table>
			    </div>		   
				</td>
			</tr>  
      </table>
    </div></td>
  </tr>
</table>
</div>
</td>
</tr>
</table>
<div class="bottom">版权所有：安徽朗坤物联网</div>
</body>
</html>